<script>
  var final = {
    name: '玲玲'
  }
  Function.prototype.myapply = function(context, arguments) {
    context = context || window;
    context.fn = this;
    let args = [...arguments];
    let result = context.fn(args);
    delete context.fn;
    return result
  }
  function test(num) {
    console.log(this.name);
    console.log(num);
  }
  test.myapply(final, [1, 2, 3])

</script>